home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / foscom12.arc / ETERM.PAS < prev    next >
Pascal/Delphi Source File  |  1989-08-26  |  1KB  |  39 lines

  1. {
  2.      Example terminal program created using FOSCOM routines
  3.      Copyright (c) 1989 by Ronen Magid. ACL
  4. }
  5.  
  6. Program Eterm;
  7. Uses Crt,FosCom;
  8.  
  9. Var
  10.   ChOUT,ChIN: Char;
  11.  
  12.  
  13. begin
  14.   Fos_Init(1);                           { Init the Fossil Driver }
  15.   Fos_Parms(1,1200,8,'N',1);             { Set Parameters to 1200,8,N,1}
  16.   Clrscr;
  17.   textcolor (14);
  18.   writeln ('Terminal Ready. COM1 1200-8-N-1. ANSI EMULATION');
  19.   textcolor (12);
  20.   writeln ('---------------------------------------------------------------');
  21.   textcolor (11);
  22.   writeln;
  23.   writeln ('You may press "@" to exit.');
  24.   writeln;
  25.   repeat
  26.     if keypressed then begin             { If a key was pressed then...}
  27.       ChOUT:=readkey;                    { Read it....}
  28.        Fos_Write(1,ChOUT);               { And shoot it via COM1...}
  29.      end;
  30.  
  31.     If Fos_Avail(1) then begin           { If char waiting in incoming buffer }
  32.       ChIN:=Fos_Receive(1);              { Then read it (1=Com1) }
  33.       Fos_Ansi(ChIN);                    { and write it via ANSI }
  34.     end;
  35.  
  36. until chout='@';                        { Until the user presses @ }
  37. Fos_Close(1);                               { Close the Fossil driver (COM1) }
  38. end.
  39.